﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace ZF.WS
{
    public partial class Logout : BLL.Page.PageBase
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Response.Buffer = true;
            Response.ExpiresAbsolute = System.DateTime.Now.AddSeconds(-1);
            Response.Expires = -1;
            Response.CacheControl = "no-cache";
            Response.AddHeader("Pragma", "No-Cache");
            Response.Cache.SetCacheability(HttpCacheability.NoCache);
            var gate = new BLL.Gate.GeneralGate();
            gate.DefaultPage = "/index.aspx";
            gate.Logout(SiteInfo.GetCurrentMember());
        }
        protected void _Login(object sender, EventArgs e)
        {
            
            var gate =new BLL.Gate.GeneralGate();
            if (!string.IsNullOrEmpty(this.Request.QueryString["form"]))
            {
                gate.DefaultPage = this.Request.QueryString["form"];
            }
            gate.Login(this.tbAccount.Text.Trim(), this.tbPwd.Text, this.cbRemember.Checked ? 30 : -1);

        }
    }
}
